#include"Sarbatori.h"
#include<fstream>
#include<assert.h>
Sarbatori::Sarbatori()
{
short k=0,d,m,y;
ifstream data;
data.open("Sarbatori.txt",ios::in);
assert(!data.fail());
data>>d;
data>>m;
data>>y;
this->s[k].init(d,m,y);
k++;
while(!data.eof())
{
data>>d;
data>>m;
data>>y;
this->s[k].init(d,m,y);
k++;
}
this->n=k;
data.close();
}
Date Sarbatori::getDate(int i)
{
return this->s[i];
}
void Sarbatori::sInainte()
{
short i,d,m,y;
short k=this->n;
Date data;
ifstream scrie;
scrie.open("Inainte.txt");
assert(!scrie.fail());
for(i=0;i<k;i++)
{
data=this->getDate(i);
d=data.getDay();
m=data.getMonth();
y=data.getYear();
scrie.close();
}
}
